<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="description" content="">
    <meta name="keywords" content="">
    <meta name="author" content="江阳小道">
    <meta name="viewport" content="width=device-width, initial-scale=0.5, maximum-scale=0.5, user-scalable=no">
    <title>深呼吸体验之旅摄影作品大赛</title>
    <!-- Set render engine for 360 browser -->
    <meta name="renderer" content="webkit">

    <!-- No Baidu Siteapp-->
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link rel="stylesheet" href="__PUBLIC__/css/reset.css">
    <link rel="stylesheet" href="__PUBLIC__/css/base.css">
    <link rel="stylesheet" href="__PUBLIC__/css/main.css">

</head>
<body>
<div class="index-page">
    <!--背景音乐-->
    <!--<audio controls="controls" autoplay="autoplay" loop="loop" hidden="hidden">-->
        <!--<source src="__PUBLIC__/vol.mp3" type="audio/mpeg">-->
    <!--</audio>-->
    <!--<div class="audio_btn" style="">-->
            <!--<img src="__PUBLIC__/img/audio_open.png"/>-->
        <!--</div>-->
    <a class="vote-enter" data-play="{$play}" href="javascript:;"><img src="__PUBLIC__/img/vote-enter.png" alt=""></a>
    <a class="my-prize" href="javascript:;"><img src="__PUBLIC__/img/my_prize.png" alt=""></a>
</div>
<!-- 我的奖品 -->

<if condition="empty($my_prize_list)">
    <div class="my-prize-dialog prize-remind translucent-bg" id="myprize" style="display:none;">
        <div class="content-mybox">
            <a class="close" href="#"></a>
            <div class="prize-info-wrap">
                <p>您暂时没有奖品！</p>

            </div>
            <div class="footer">
                <a class="share"><img src="__PUBLIC__/img/share-friend.png" alt=""></a>
            </div>
        </div>
    </div>
    <else />

    <div class="my-prize-dialog prize-remind translucent-bg" id="myprize" style="display:none;">
        <div class="content-mybox">
            <a class="close" href="#"></a>
            <div class="prize-info-wrap">
                <volist name="my_prize_list" id="vo">
                    <p>奖品：{$vo.prize_name}</p>
                    <p>手机：{$vo.phone}</p>
                </volist>
            </div>
            <div class="footer">
                <a class="share"><img src="__PUBLIC__/img/share-friend.png" alt=""></a>
            </div>
        </div>
    </div>
</if>




<!-- 自动弹出获奖说明 -->
   <div class="my-prize-dialog prize-remind translucent-bg" id="introduction">
        <div class="content-box">
            <a class="close" href="#"></a>
            <div class="prize-info-wrap">
                        <div class="prize-info">
                            <b>深呼吸小城 闽学之旅</b> <br />
                            首届“深呼吸小城”大学生体验之旅圆满成行，莘莘学子，闽学文化，美丽乡村，深呼吸旅游来了一个完美的结合，两天一夜的点点滴滴，我们收集到了许多精彩的作品，
                            现面向平台用户发起评选，参与投票都有机会获得10到100元话费哦！<br/>

                            票数前三名将获得：<br/>
                            一等奖：iPhone 6s一部<br/>
                            二等奖：华为P8一部<br/>
                            三等奖：华为荣耀4X一部
                        </div>
            </div>
            <div class="footer">
                <a class="share"><img src="__PUBLIC__/img/share-friend.png" alt=""></a>
            </div>
        </div>
    </div>




<!-- 微信分享 -->
<div class="wx-share translucent-bg hidden">
    <img src="__PUBLIC__/img/wx-share.png" alt="">
</div>








<!-- 获奖提醒 -->
<div class="get-prize-dialog prize-remind translucent-bg in-prize hidden">
    <div class="content">
        <a class="close" href="#"></a>
        <div class="prize-info">
            <img src="__PUBLIC__/img/get-prize-text.png" alt="">
        </div>
        <div class="footer">
            <a class="close" href="#"><img src="__PUBLIC__/img/btn-know.png" alt=""></a>
            <a class="share"><img src="__PUBLIC__/img/share-friend.png" alt=""></a>
        </div>

            <img data="" class="footer-text data-go" src="__PUBLIC__/img/wz2.png" alt="">
            <!--<a class="go data-go" data="{$play1}" href="{:U('Member/Member/info')}?way=1">-->
            </a>

        <a href="javascript:;" class="show-code"></a>
        <!--        <a href="javascript:;" class="go"></a>-->
    </div>
</div>
<!-- 未获奖提醒 -->


<!-- 二维码 -->

<div class="qr-code-scan translucent-bg hidden">
    <if condition="S('type_'.$_SESSION['userid']) eq 1">
        <img src="__PUBLIC__/img/gqt.png" alt="">
    <elseif condition="S('type_'.$_SESSION['userid']) eq 2" />
        <img src="__PUBLIC__/img/xhw.png" alt="">
    </if>
</div>





<!-- 微信分享 -->
<div class="wx-share translucent-bg hidden">
    <img src="__PUBLIC__/img/wx-share.png" alt="">
</div>

<script src="__PUBLIC__/js/lib/zepto.min.js"></script>
<script src="__PUBLIC__/js/main.js"></script>
<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script type="text/javascript">
    $(document).ready(function() {
        var un_on = "{$_GET['un_on']}";
        var in_on = "{$_GET['in_on']}";
        if(un_on == 1){
            //显示未中奖框
            $(".no-prize").removeClass("hidden");
            if($(".data").attr('data')==0){
                $(".data").hide();
                $(".go").hide();
                $(".show-code").hide();
                $(".code").hide();
            }
            else{
                $(".data").show();

            }


            if($(".data-go").attr('data')==0){
                $(".data-go").hide();
                $(".go").hide();
                $(".show-code").hide();

            }else{
                $(".data-go").show();
            }

        }
        if(in_on == 1){
            //显示中奖框

            $(".in-prize").removeClass("hidden");

            if($(".data").attr('data')==0){
                $(".data").addClass("hidden");
                $(".go").hide();
                $(".show-code").hide();

                $(".code").hide();
            }
            else{
                $(".data").show();

            }

            if($(".data-go").attr('data')==0){
                $(".data-go").hide();
                $(".go").hide();
                $(".show-code").hide();

            }else{
                $(".data-go").show();
            }

        }

        $(".close").tap(function(){
            $(this).parents(".prize-remind").addClass("hidden");
        });
        $(".share").tap(function(){
            $(".wx-share").removeClass("hidden");
        });
        $(".wx-share").tap(function(){
            $(".wx-share").addClass("hidden");
        });
        $(".show-code").tap(function(){
            $(".qr-code-scan").removeClass("hidden");
        });
        $(".qr-code-scan").tap(function(){
            $(".qr-code-scan").addClass("hidden");
        });



        $(".vote-enter").on("tap",function(){

            $("#my-prize").hide();
            //1次之后
//            if($(".vote-enter").attr('data-play') <= 0){

                location.href="{:U('Member/Member/info')}";
//                $(".recode").show();

                //第一次进入
//            }else if($(".vote-enter").attr('data-play') ==1){
//
//                location.href="{:U('Member/Member/info')}";
//                //玩完一次后点击
//            }
        });

        $(".my-prize").tap(function(){
            $("#myprize").removeClass('hidden');
            $("#myprize").show();
        });

        

    });
</script>
<script>
 //背景音乐开关
    $(function(){
        var audio = $("audio")[0];
        var turn = 0;
        $(".audio_btn").click(function(){
            if(turn){
                turn = 0;
                $(this).find('img').attr('src','__PUBLIC__/img/audio_open.png');
                audio.play();
            }else{
                turn = 1;
                $(this).find('img').attr('src','__PUBLIC__/img/audio_close.png');
                audio.pause();
            }
        });
    });
</script>

<script>
$(document).ready(function() {
//初始化分享
        fenxiang("深呼吸体验之旅摄影作品大赛");
        function fenxiang(title,desc){
            //微信分享
            wx.config({
                debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
                appId: "{:C('APPID')}", // 必填，公众号的唯一标识
                timestamp: "{$wxKey['timestamp']}", // 必填，生成签名的时间戳
                nonceStr: "{$wxKey['noncestr']}", // 必填，生成签名的随机串
                signature: "{$wxKey['signature']}",// 必填，签名，见附录1
                jsApiList: ['onMenuShareTimeline','onMenuShareAppMessage'] // 必填，需要使用的JS接口列表，所有JS接口列表见附录2
            });
            wx.ready(function () {
                var shareData = {
                    title: title,
                    desc: "有体验游，有奖品，有创业项目，只因他们是深呼吸粉丝！",
                    link: "http://tp.nidjia.com{:U('Home/Index/notice')}",
                    imgUrl: "{:C('APP_URL')}/Public/img/logo.jpg"
                };
                wx.onMenuShareAppMessage(shareData);
                wx.onMenuShareTimeline(shareData);
            });
            wx.error(function(res){
                alert(res.errMsg);
            });
        }

    $(".share").tap(function(){
        $(".wx-share").removeClass("hidden");
    });
    $(".wx-share").tap(function(){
        $(".wx-share").addClass("hidden");
    });
});


</script>

</body>
</html>
